#pragma once
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>

#include <string>
#include <vector>


#ifdef __APPLE__


class CPcieComm {
public:
  CPcieComm();
  ~CPcieComm();

public:
  /*
   * Function des:
   * In:
   * Out:
   * Return:
   */
  int pcie_open();

  /*
   * Function des:
   * In:
   * Out:
   * Return:
   */
  int pcie_write(UINT addr_offset, BYTE *data, UINT len, std::string device="h2c_0");

  /*
   * Function des:
   * In:
   * Out:
   * Return:
   */
  int pcie_read(UINT addr_offset, BYTE *data, UINT &len, std::string device="c2h_0");

  /*
   * Function des:
   * In:
   * Out:
   * Return:
   */
  bool pcie_is_open();

  /*
   * Function des:
   * In:
   * Out:
   * Return:
   */
  int pcie_close();

private:

};

#endif


